body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #eee;
}

input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    z-index: -1;
}

.check-box {
    display: flex;
    align-items: center;
    width: 90px;
    height: 50px;
    background: #2f4056;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.5s ease;
}

.check-handler {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 5px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
}

.check-handler::before {
    font-family: "Font Awesome 6 Free";
    content: "\f00d";
    color: #2f4056;
    font-size: 1.5em;
    font-weight: 900;
}

input[type="checkbox"]:checked+.check-box {
    background: #5fb878;
}

input[type="checkbox"]:checked+.check-box .check-handler {
    margin-left: 50%;
}

input[type="checkbox"]:checked+.check-box .check-handler::before {
    font-family: "Font Awesome 6 Free";
    content: "\f00c";
    color: #5fb878;
}